
package com.seekting.study;

public class SuperOvershootInterpolator {

    public static void main(String[] args) {

        float begin = 0;
        float end = 0f;
        float min = Integer.MAX_VALUE;
        float max = Integer.MIN_VALUE;
        for (int i = 0; i < 100; i++) {
            float in = i * 0.01f;
            end = getZuni(in);
            if (i == 0) {
                begin = end;
            }

            min = Math.min(min, end);
            max = Math.max(max, end);
            System.out.println(end);

        }
        System.out.println("xxx" + (max - min));

        double e = Math.pow(3, 0);
        System.out.println("e" + e);

        double cos = Math.cos(Math.PI / 2);

    }

    public static float getZuni(float t) {

        float A = 1.8f;
        float w = (float) (Math.PI * 2f) + 0.5f;
        float s = (float) (Math.PI / 2) + 0.3f;
        float y = 0;
        double xx = Math.pow(Math.E, -s * t);
        double y1 = A * xx;
        double y2 = Math.cos(w * t + s);
        y = -(float) (y1 * y2);
        return y;
    }
}
